﻿<UserControl x:Class="SMS.Views.Tracking.TrackingPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" >
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition Height="2"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <sdk:DataGrid AutoGenerateColumns="False" Grid.Row="0" IsReadOnly="True" ItemsSource="{Binding SalesHistoryList}" SelectedItem="{Binding SelectedSaleHistory, Mode=TwoWay}">
                <sdk:DataGrid.Columns>
                    <sdk:DataGridTextColumn Header="Sale ID" Binding="{Binding Sale_ID}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="SalesMan Name" Binding="{Binding SalesMan.SalesMan_Name}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Customer Name" Binding="{Binding Customer.Customer_Name}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Total Price" Binding="{Binding TotalSellingPrice}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Actual Price" Binding="{Binding ActualSelliingPrice}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Buying Price" Binding="{Binding BuyingPrice}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Date" Binding="{Binding Selling_Date}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Discount" Binding="{Binding Discount}"></sdk:DataGridTextColumn>
                    
                    <sdk:DataGridTextColumn Header="Counter ID" Binding="{Binding Counter_ID}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Is Paid" Binding="{Binding Is_Paid}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Remark" Binding="{Binding Remarks}"></sdk:DataGridTextColumn>
                </sdk:DataGrid.Columns>
            </sdk:DataGrid>
            <sdk:DataGrid AutoGenerateColumns="False" IsReadOnly="True" Grid.Row="2" ItemsSource="{Binding SalesDetailList}" SelectedItem="{Binding SelectedSaleDetail, Mode=TwoWay}">
                <sdk:DataGrid.Columns>
                    <sdk:DataGridTextColumn Header="SaleDetail_ID" Binding="{Binding SaleDetail_ID}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Sales_ID" Binding="{Binding SalesHistory.Sale_ID}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="ProductStockWiseID" Binding="{Binding ProductStockWise.Product_Stock_ID}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Quantity" Binding="{Binding Quantity}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="SellingUnitPrice" Binding="{Binding SellingUnitPrice}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="BilledAmount" Binding="{Binding BilledAmount}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="TotalAmount" Binding="{Binding TotalAmount}"></sdk:DataGridTextColumn>
                    <sdk:DataGridTextColumn Header="Discount" Binding="{Binding Discount}"></sdk:DataGridTextColumn>
                    
                </sdk:DataGrid.Columns>
            </sdk:DataGrid>
        </Grid>
    </Grid>
</UserControl>
